Layouts

Load cuxfilter and data

[1]:
from cuxfilter import charts
import cuxfilter
from bokeh import palettes
cux_df = cuxfilter.DataFrame.from_arrow('../../../data/146M_predictions_v2.arrow')

Declare charts

[2]:
#tile provider for choropleth map
chart0 = charts.choropleth(x='zip', y='delinquency_12_prediction', color_column='delinquency_12_prediction', color_aggregate_fn='mean',
                                  geo_color_palette=palettes.Purples9,
                                  geoJSONSource = 'https://raw.githubusercontent.com/rapidsai/cuxfilter/GTC-2018-mortgage-visualization/javascript/demos/GTC%20demo/public/data/zip3-ms-rhs-lessprops.json',
                                  data_points=1000, nan_color='white')
chart1 = charts.bar('dti')
chart2 = charts.bar('delinquency_12_prediction')
chart3 = charts.line('borrower_credit_score',step_size=1)
chart4 = charts.bar('seller_name',data_points=100)
chart5 = charts.line(x='loan_id',y='current_actual_upb')
chart6 = charts.line('dti')
chart7 = charts.line('delinquency_12_prediction')
chart8 = charts.bar('borrower_credit_score', data_points=100)
chart_widget = charts.multi_select('dti')

#create a list of charts
charts_list = [chart_widget, chart0, chart3, chart1, chart2, chart4, chart5, chart6, chart7, chart8]

Layout Types

1. Single feature

90b69f7965ec4a63ba54c970e8c96283

[3]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.single_feature, theme=cuxfilter.themes.rapids, title="Layout - single feature")
await d.preview()
../_images/layouts_Layouts_8_2.png

2. Feature and base

ab6ef47fe9c340d79139f35411c5510c

[4]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_base, theme=cuxfilter.themes.rapids, title="Layout - feature and base")
await d.preview()
../_images/layouts_Layouts_11_2.png

3. Double feature

b7e6764bb1464b339825d1d63fb301db

[5]:
d = cux_df.dashboard([chart_widget, chart0, chart1], layout=cuxfilter.layouts.double_feature, theme=cuxfilter.themes.rapids, title="Layout - double feature")
await d.preview()
../_images/layouts_Layouts_14_2.png

4. Left feature right double

67d584926f7044f592e3ea20ac6ca7e5

[6]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.left_feature_right_double, theme=cuxfilter.themes.rapids, title="Layout - left feature right double")
await d.preview()
../_images/layouts_Layouts_17_2.png

5. Triple feature

bdb7577c0bbd42e585e2b7dc68501a33

[7]:
d = cux_df.dashboard([chart_widget, chart1, chart2, chart3], layout=cuxfilter.layouts.triple_feature, theme=cuxfilter.themes.rapids, title="Layout - triple feature")
await d.preview()
../_images/layouts_Layouts_20_2.png

6. Feature and double base

e9b3ed3e8c6b4d55a3cb902822470a54

[8]:
d = cux_df.dashboard([chart_widget, chart0, chart2, chart3], layout=cuxfilter.layouts.feature_and_double_base, theme=cuxfilter.themes.rapids, title="Layout - feature and double base")
await d.preview()
../_images/layouts_Layouts_23_2.png

7. Two by two

f8dee0b40c36488eabf04d5d0491918f

[9]:
d = cux_df.dashboard([chart_widget, chart0, chart2, chart3, chart4], layout=cuxfilter.layouts.two_by_two, theme=cuxfilter.themes.rapids, title="Layout - two by two")
await d.preview()
../_images/layouts_Layouts_26_2.png

8. Feature and triple base

630a2fd9fd484b5a8316910d7553d03c

[10]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_triple_base, theme=cuxfilter.themes.rapids, title="Layout - feature and triple base")
await d.preview()
../_images/layouts_Layouts_29_2.png

9. Feature and quad base

5dd133ffc4a74342b36f93b2e797d691

[11]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_quad_base, theme=cuxfilter.themes.rapids, title="Layout - feature and quad base")
await d.preview()
../_images/layouts_Layouts_32_2.png

10. Feature and five edge

34a889da4255434ba99a0b02d11f6ae9

[12]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.feature_and_five_edge, theme=cuxfilter.themes.rapids, title="Layout - feature and five edge")
await d.preview()
../_images/layouts_Layouts_35_2.png

11. Two by three

327049d089534481ac6b430ef5f7c4a3

[13]:
d = cux_df.dashboard([chart_widget, chart3, chart1, chart2, chart4, chart5, chart6], layout=cuxfilter.layouts.two_by_three, theme=cuxfilter.themes.rapids, title="Layout - two by three")
await d.preview()
../_images/layouts_Layouts_38_2.png

12. Double feature quad base

0536230bcf114a15922eeff64ce0bd09

[14]:
d = cux_df.dashboard(charts_list, layout=cuxfilter.layouts.double_feature_quad_base,
                     theme=cuxfilter.themes.rapids, title="Layout - double feature quad base")
await d.preview()
../_images/layouts_Layouts_41_2.png

13. Three by three

d635d7010fa14893b5cbd4f396cdb765

[15]:
d = cux_df.dashboard(charts_list[2:], layout=cuxfilter.layouts.three_by_three,
                     theme=cuxfilter.themes.rapids, title="Layout - three by three")
[16]:
await d.preview()
../_images/layouts_Layouts_45_0.png